// smart_tensor.h
#ifndef SMART_TENSOR_H
#define SMART_TENSOR_H

#include <vector>
#include <stdexcept>

class SmartTensor {
private:
    std::vector<int> shape;
    std::vector<double> data;

    int flattenIndex(const std::vector<int>& indices) const;

public:
    SmartTensor(const std::vector<int>& s);
    std::vector<int> getShape() const;
    double get(const std::vector<int>& indices) const;
    void set(const std::vector<int>& indices, double value);
    SmartTensor operator+(const SmartTensor& other) const;
    SmartTensor operator*(double scalar) const;
    SmartTensor matrixMultiply(const SmartTensor& other) const;
    void print() const;
};

#endif // SMART_TENSOR_H